package com.hmyuan.webdesktop.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.hmyuan.webdesktop.domain.UserFilecode;
import com.hmyuan.webdesktop.mapper.UserFilecodeMapper;
/**
 * 文件资源值配置service
 * @author suxiaofei
 *
 */
@Service
public class UserFilecodeService {

	@Resource
	UserFilecodeMapper userFilecodeMapper;

	public UserFilecode findById(int id){
		
		return userFilecodeMapper.selectByPrimaryKey(id);
	}
	
	public List<UserFilecode> findList(UserFilecode userFilecode) {
		// TODO Auto-generated method stub
		return userFilecodeMapper.selectList(userFilecode);
	}

	public boolean update(UserFilecode userFilecode) {
		// TODO Auto-generated method stub
		int num = userFilecodeMapper.updateByPrimaryKeySelective(userFilecode);
		return num==1?true:false;
	}

	public boolean save(UserFilecode userFilecode) {
		// TODO Auto-generated method stub
		int num = userFilecodeMapper.insert(userFilecode);
		return num==1?true:false;
	}

	public boolean deleteById(Integer id) {
		// TODO Auto-generated method stub
		int num = userFilecodeMapper.deleteByPrimaryKey(id);
		return num==1?true:false;
	}

	
}
